<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Carbon\Carbon;

class CmLabelSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $labels = [
            ['label_name' => '基础题', 'sort' => 1],
            ['label_name' => '提高题', 'sort' => 2],
            ['label_name' => '竞赛题', 'sort' => 3],
            ['label_name' => '高考真题', 'sort' => 4],
            ['label_name' => '模拟题', 'sort' => 5],
            ['label_name' => '易错题', 'sort' => 6],
            ['label_name' => '经典题', 'sort' => 7],
            ['label_name' => '重点题', 'sort' => 8],
            ['label_name' => '难点题', 'sort' => 9],
            ['label_name' => '综合题', 'sort' => 10],
            ['label_name' => '选择题', 'sort' => 11],
            ['label_name' => '填空题', 'sort' => 12],
            ['label_name' => '解答题', 'sort' => 13],
            ['label_name' => '证明题', 'sort' => 14],
            ['label_name' => '计算题', 'sort' => 15],
            ['label_name' => '应用题', 'sort' => 16],
            ['label_name' => '实验题', 'sort' => 17],
            ['label_name' => '阅读题', 'sort' => 18],
            ['label_name' => '作文题', 'sort' => 19],
            ['label_name' => '翻译题', 'sort' => 20],
        ];

        foreach ($labels as $label) {
            DB::table('cm_label')->insert([
                'label_name' => $label['label_name'],
                'sort' => $label['sort'],
                'created_at' => Carbon::now(),
                'updated_at' => Carbon::now(),
            ]);
        }
    }
}